<template lang="html">
  <div class="loading-page" v-if="loading">
    <img alt="" src="../../assets/img/loading.gif" />
  </div>
</template>

<script>
  export default {
    data: () => ({
      loading: false
    }),
    methods: {
      start () {
        this.loading = true;
      },
      finish () {
        this.loading = false;
      }
    }
  };
</script>

<style lang="scss" scoped>
  .loading-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f4f4f4;
    text-align: center;
    font-size: 30px;
    font-family: sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    img{
      width: 280px;
      height: 200px;
    }
  }
</style>
